package zunyi04;

/**
 * 测试类
 */
public class Test {
    public static void main(String[] args) {
        //第一种无参赋值
        //程序员对象
        Coder coder = new Coder();
        //经理对象
        Manager manager = new Manager();
        coder.setId(1);
        coder.setName("小张");
        coder.setSalary(5000);

        manager.setId(1);
        manager.setName("老张");
        manager.setSalary(12000);
        manager.setBonus(6000);

        //带参赋值
        Coder coder1 = new Coder("小张",1,5000);
        Manager manager1 = new Manager("老张",1,12000,6000);

        System.out.print("工号为"+manager.getId()+"基本工资为"+manager.getSalary()+"奖金为"+manager.getBonus()+"的"+manager.getName()+"正在努力的做着");
        manager.work();
        System.out.print("工号为"+coder.getId()+"基本工资为"+coder.getSalary()+"的"+coder.getName()+"正在努力的");
        coder.work();
    }

}
